<%-- 
    Document   : header
    Created on : Apr 10, 2012, 9:52:48 AM
    Author     : Yudi Retanto
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>${title}</title>
        <link rel="stylesheet" href="assets/css/reset.css" type="text/css" media="screen, projection" />
        <link rel="stylesheet" href="assets/css/style.css" type="text/css" media="screen, projection" />
        <link rel="stylesheet" href="assets/css/default.css" type="text/css" media="screen, projection" />
        <script type="text/javascript" src="assets/js/jquery.min.js"></script>
    </head>
    <body>
        <div id="main-container">
            <div id="header">
                <div class="shell">
                    <!-- Logo + Top Nav -->
                    <div id="top">
                        <h1><a href="./home">Sistem Surveilans KLB</a></h1>
                        <div id="top-navigation">
                            <c:choose>
                                <c:when test="${sessionScope.authenticated!=null}">
                                    Welcome <strong>${sessionScope.user}</strong>
                                    <span>|</span>
                                    <a href="./home?action=logout">Log out</a>
                                </c:when>
                                <c:otherwise>
                                    <a href="./home?action=login_unit">Unit</a>
                                    <span>|</span>
                                    <a href="./home?action=login_admin">Admin</a>
                                </c:otherwise>
                            </c:choose>
                        </div>
                    </div>
                    <!-- End Logo + Top Nav -->
                        
                    <!-- Main Nav -->
                    <div id="navigation">
                        <ul>
                            <!--admin-->
                            <c:if test="${sessionScope.authenticated==true}">
                            <c:choose>
                                <c:when test="${sessionScope.role ==1}">
                                    <li><a class="active" href="./admin"><span>Unit Surveilans</span></a></li>
                                    <li><a href="./admin?action=list_data"><span>Data Surveilans</span></a></li>
                                </c:when>
                                <c:when test="${sessionScope.role ==2}">
                                    <li><a class="active" href="./unit"><span>Data Surveilans</span></a></li>
                                    <li><a href="./unit?action=laporan"><span>Laporan Surveilans</span></a></li>
                                </c:when>
                            </c:choose>
                            </c:if>
                            <li><a href="./info?type=map"><span>Peta Penyebaran Penyakit</span></a></li>
                            <li><a href="./info?type=tabel"><span>Tabel Penyebaran Penyakit</span></a></li>
                        </ul>
                    </div>
                    <!-- End Main Nav -->
                </div>
            </div>             
            <c:if test="${sessionScope.flash != null}">
            <div class="notification ${sessionScope.flash_type}">
                <div>
                    <p>${sessionScope.flash}</p>
                </div>
                <% session.setAttribute("flash", null);%>
                <% session.setAttribute("flash_type", null);%>
            </div>
            </c:if>
